-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physical Shadow Softness Parameter #16698
Draft
ecoskey
wants to merge
18
commits into
bevyengine:main
Choose a base branch
from
ecoskey:sun_radius
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
still need to fix shaders + examples
not quite working still, check accuracy
I don't really like |
alice-i-cecile
added
C-Feature
A new feature, making something new possible
A-Rendering
Drawing game state to the screen
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
labels
Dec 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
C-Feature
A new feature, making something new possible
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Currently, directional lights use a non-physical
soft_shadow_size
value to determine soft shadows, in units of texels. This won't work with atmospherics, which needs a physical value for the angular size of the light to draw sun disks.Solution
replace
soft_shadow_size
withangular_size
, which is no longer optional. This field describes the angular size of the light/sun, or the angle between one side of the sun and the other in the sky, through its center.Add new
ShadowsStyle
component:ShadowsStyle
Testing
Tested pcss example, directional soft shadows don't work quite right. Hard shadows in other examples seem unaffected.
Migration Guide
The
shadows_enabled
andenable_soft_shadows
fields have been removed from all lights. Add theShadowsStyle::Hard
component to a light to enable hard shadows, orShadowsStyle::Soft
to enable soft shadows (only with theexperimental_pbr_pcss
feature).before:
after:
Instead of
soft_shadow_size
on directional lights, useangular_size
. This field describes the angular size of the light/sun, or the angle between one side of the sun and the other in the sky, through its center. Its default value corresponds to the angular size of Earth's sun in the sky.